'''
This module overrides some methods in U{twisted.python.runtime 
<http://twistedmatrix.com>} Module.

@author: Hatem Oraby
'''



def __platformSupportThreads(self):
    '''The method sets the platform as not supporting threads'''
    return False


def installPlatformSupportThread():
    '''The method overrides twisted method with the overridden
    method and make the 
    platform does not support threading.'''
    from twisted.python.runtime import Platform
    from twistedSim.overrideManager import OverrideManager
    OverrideManager.storeEntity(originalFn = Platform.supportsThreads,
                                fullName = "twisted.python.runtime.Platform.supportsThreads")
    Platform.supportsThreads = __platformSupportThreads
    
    
def installAll():
    '''Install all the overriding methods.'''
    installPlatformSupportThread()